#ifndef CLIENT_MESSAGE_H
#define CLIENT_MESSAGE_H
#include "protocol.h"
#include <sys/types.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct room Room;
typedef struct personList PersonList;
void init_clientMessage(int fd);
//Send
int enterUser(const char* name);
int quitUser(void);
int joinRoom(unsigned int id);
int makeRoom(const char* name);
int sendChat(const char* chat, unsigned int roomID);

//music(need Thread)
/**********************************************/
//int startSendMusic(const char* musicFullPath);
//int sendMusic(unsigned char* buf, size_t size);
//int endSendMusic(void);
/*********************************************/
struct roomInfo* requestRoomList();
struct userInfo* requestUserList();

//Receive
int sendMessage(int sendFd, struct message msg);
int receiveMessage(struct message msg);
void* receiver(void* arg);
#ifdef __cplusplus
}
#endif
#endif
